<template>
    <div>
        <!-- 数据同步 -->
        <div class="all-container">
            <!-- 表格栏 -->
            <el-row>
                <el-col :span="24">
                    <el-table
                    :data="osList"
                    stripe
                    style="width: 100%">
                        <el-table-column
                        prop="name"
                        label="作业名称"
                        width="250">
                        </el-table-column>
                        <el-table-column
                        prop="execution_time"
                        label="执行时间"
                        >
                        <template slot-scope="scope">
                            <el-time-select
                                v-model="modTime"
                                :picker-options="{
                                    start: '08:30',
                                    step: '00:15',
                                    end: '18:30'
                                }"
                                placeholder="选择时间" size="mini">
                                </el-time-select>
                        </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
export default {
  data: function() {
    return {
        osList:[],
        modTime:"",
        isNO:""
    };
  },
  methods: {
      getOsList(){
          this.getRequest("/sys/task/list").then(data=>{
              var i=0;
              for(var item of data.data){
                  this.osList.push({
                      name:<div>{item.name}<br/><div>{item.last_run_time}</div></div>,
                      is_enable:item.is_enable,
                      execution_time:item.execution_time
                  });
              }
          });
      }
  },
  computed: {},
  watch: {},
  mounted() {
      console.log("oswork");
      this.getOsList();
      this.$emit("sendActive", "3-5");
  }
};
</script>
<style scoped src="../../assets/css/allManage/oswork.css">
</style>